package com.xps.charmingshop.view.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.xps.charmingshop.R;
import com.xps.charmingshop.view.activity.DetailsActivity;
import com.xps.charmingshop.view.base.BaseFragment;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;


/**
 * Created by MI on 2018/1/10.
 */

public class CompleteFragment extends BaseFragment {
    @BindView(R.id.chakan)
    TextView chakan;
    Unbinder unbinder;

    @Override
    protected int getRes() {
        return R.layout.fragment_complete;
    }

    @Override
    protected void init(View view) {
        unbinder = ButterKnife.bind(this, view);
    }

    @Override
    protected void setData(View view) {

    }

    @Override
    public void onClick(View v) {

    }

    public void hide() {
        FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
        fragmentTransaction.addToBackStack(null);
        fragmentTransaction.hide(this);
        fragmentTransaction.commit();
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }

    @OnClick(R.id.chakan)
    public void onViewClicked() {
        startActivity(new Intent(getActivity(), DetailsActivity.class));
    }
}
